expander: Make a code snippet compile
authorTimm Bäder <mail@baedert.org>
Wed, 3 Jan 2018 13:29:00 +0000 (14:29 +0100)
committerDaniel Boles <dboles@src.gnome.org>
Sun, 7 Jan 2018 16:38:41 +0000 (16:38 +0000)
gtk/gtkexpander.c

index 37e2519dada4afb7cc4efb1ab02da767b4c7926a..cd77178f010f33e53041e895cf4cf60b5039510d 100644 (file)
  * connection as follows:
  *
  * |[<!-- language="C" -->
- * expander = gtk_expander_new_with_mnemonic ("_More Options");
- * g_signal_connect (expander, "notify::expanded",
- *                   G_CALLBACK (expander_callback), NULL);
- *
- * ...
- *
  * static void
  * expander_callback (GObject    *object,
  *                    GParamSpec *param_spec,
  *       // Hide or destroy widgets
  *     }
  * }
+ *
+ * static void
+ * create_expander (void)
+ * {
+ *   GtkWidget *expander = gtk_expander_new_with_mnemonic ("_More Options");
+ *   g_signal_connect (expander, "notify::expanded",
+ *                     G_CALLBACK (expander_callback), NULL);
+ *
+ *   // ...
+ * }
  * ]|
  *
  * # GtkExpander as GtkBuildable